
import request from '@/utils/request';
// import user from 'mock/user';



export default{
    // DELETE /admin/product/baseTrademark/remove/{id}
    // 删除用户
    //DELETE /manage_system/user-wechat/deleteUserWechat
    deleteUser(token,openId){
        // return request.delete(`/admin/product/baseTrademark/remove/${id}`)
        // alert(openId)
        return request({
            // params:{token:token},
            params:{token:token,openId:openId},
            url:(`/service_manage/user-wechat/deleteUserWechat`),
            method:'delete'

        })
    },
    // POST /admin/product/baseTrademark/save
    // 新增用户
    // PUT /admin/product/baseTrademark/update
    // 修改用户
    //POST /manage_system/user-wechat/modifyUserWechat
    addOrUpdate(token,userlist){
        if(userlist.openId){
            return request({
                params:{token:token},
                url:(`/service_manage/user-wechat/modifyUserWechat`),
                data:userlist,
                method:'post',
            })
            // return request.post('/manage_system/user-wechat/modifyUserWechat',userlist,params=getToken())
        }else{
            return request.post('/admin/product/baseTrademark/save',userlist)
        }
    },
    // GET /admin/product/baseTrademark/{page}/{limit}'
    //GET /manage_system/user-wechat/UserWechatPageQuery/{page}/{limit}

    getUserList(token,page,limit){
        
        // return request.get(`/admin/product/baseTrademark/${page}/${limit}`)
        // return request.get(`/manage_system/user-wechat/UserWechatPageQuery/${page}/${limit}`)
        return request({
            params:{token:token},
            url:(`/service_manage/user-wechat/UserWechatPageQuery/${page}/${limit}`),
            methods:'get'
        })
        
    }
}
